import java.lang.Math;
public class Main {
	public static int fac(int n){
			if(n==1)
			return 1;
			else
			return n*fac(n-1);
	}
	public static void main(String[] args){
		int m;
		double k,sum,i;
		for(i=0.2;i<=1;i=i+0.2)
			{
				k=i;
				m=1;
				sum=1;
			while((k/fac(m))>=0.00001)
			   { 
				   sum=k/fac(m)+sum;
				   k=k*k;
				   m++; 
			   }
			   System.out.println("近似值"+sum);
			   System.out.println("真值"+Math.exp(i));
			}
     }
}